/*
 Navicat Premium Data Transfer

 Source Server         : mysql_bang
 Source Server Type    : MySQL
 Source Server Version : 50718
 Source Host           : localhost
 Source Database       : bshop

 Target Server Type    : MySQL
 Target Server Version : 50718
 File Encoding         : utf-8

 Date: 07/13/2017 17:38:35 PM
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `shop_arrtK_cate`
-- ----------------------------
DROP TABLE IF EXISTS `shop_arrtK_cate`;
CREATE TABLE `shop_arrtK_cate` (
  `id` int(11) NOT NULL,
  `arrtKId` int(11) DEFAULT NULL,
  `cateId` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `shop_arrt_cate_ibfk_1` (`arrtKId`),
  KEY `shop_arrt_cate_ibfk_2` (`cateId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `shop_arrtK_cate`
-- ----------------------------
BEGIN;
INSERT INTO `shop_arrtK_cate` VALUES ('1000', '100000', '101010'), ('1002', '100001', '101010'), ('1003', '100002', '101010'), ('1004', '100005', '1501');
COMMIT;

-- ----------------------------
--  Table structure for `shop_attr`
-- ----------------------------
DROP TABLE IF EXISTS `shop_attr`;
CREATE TABLE `shop_attr` (
  `attrId` int(20) NOT NULL AUTO_INCREMENT,
  `productId` int(11) NOT NULL,
  `attrKid` int(11) DEFAULT NULL,
  `attrVid` int(11) DEFAULT NULL,
  `isSku` int(11) DEFAULT NULL,
  `skuId` int(11) DEFAULT NULL,
  `creatTime` datetime DEFAULT NULL,
  PRIMARY KEY (`attrId`),
  KEY `productId` (`productId`),
  KEY `skuId` (`skuId`),
  KEY `attrKid` (`attrKid`),
  KEY `attrVid` (`attrVid`)
) ENGINE=InnoDB AUTO_INCREMENT=10010 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `shop_attr`
-- ----------------------------
BEGIN;
INSERT INTO `shop_attr` VALUES ('10000', '100002', '100000', '1000', '1', '1000', null), ('10001', '100002', '100005', '1000', '1', '1000', null), ('10002', '100003', '100000', '1005', '1', '8093', null), ('10003', '100003', '100004', '1005', '1', '8093', null), ('10004', '2147483647', '100006', '6001', '1', '574829', null), ('10005', '2147483647', '100006', '6001', '1', '574830', null), ('10006', '2147483647', '100006', '6002', '1', '574831', null), ('10007', '2147483647', '100006', '6003', '1', '574832', null), ('10008', '100005', '100006', '6002', '0', '100', null);
COMMIT;

-- ----------------------------
--  Table structure for `shop_attr_k`
-- ----------------------------
DROP TABLE IF EXISTS `shop_attr_k`;
CREATE TABLE `shop_attr_k` (
  `attrK_id` int(11) NOT NULL,
  `k_id` int(11) DEFAULT NULL,
  `attrName` varchar(20) DEFAULT NULL,
  `cateid` int(11) DEFAULT NULL,
  `isAlias` int(11) DEFAULT NULL,
  `isColor` int(11) DEFAULT NULL,
  `isEnmu` int(11) DEFAULT NULL,
  `isInput` int(11) DEFAULT NULL,
  `isKey` int(11) DEFAULT NULL,
  `isSale` int(11) DEFAULT NULL,
  `isSearch` int(11) DEFAULT NULL COMMENT '是否搜索',
  `isRequire` int(11) DEFAULT NULL,
  `isMuti` int(11) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL,
  `createtime` datetime DEFAULT NULL,
  PRIMARY KEY (`attrK_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `shop_attr_k`
-- ----------------------------
BEGIN;
INSERT INTO `shop_attr_k` VALUES ('100000', null, '颜色', null, null, null, null, null, null, null, null, null, null, null, null, null), ('100001', null, '内存', null, null, null, null, null, null, null, null, null, null, null, null, null), ('100002', null, '硬盘', null, null, null, null, null, null, null, null, null, null, null, null, null), ('100003', null, '尺码', null, null, null, null, null, null, null, null, null, null, null, null, null), ('100004', null, '容量', null, null, null, null, null, null, null, null, null, null, null, null, null), ('100005', null, '口味', null, null, null, null, null, null, null, null, null, null, null, null, null), ('100006', null, '时长', null, null, null, null, null, null, null, null, null, null, null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `shop_attr_v`
-- ----------------------------
DROP TABLE IF EXISTS `shop_attr_v`;
CREATE TABLE `shop_attr_v` (
  `attrV_id` int(11) NOT NULL AUTO_INCREMENT,
  `v_Name` varchar(20) DEFAULT NULL,
  `attrK_id` int(11) DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL,
  `cateId` int(11) DEFAULT NULL,
  `createTime` datetime DEFAULT NULL,
  PRIMARY KEY (`attrV_id`),
  KEY `attrK_id` (`attrK_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6005 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `shop_attr_v`
-- ----------------------------
BEGIN;
INSERT INTO `shop_attr_v` VALUES ('1000', '蓝色', '100000', null, null, null, null), ('1001', '红色', '100000', null, null, null, null), ('1002', '绿色', '100000', null, null, null, null), ('1003', '白色', '100000', null, null, null, null), ('1004', '黑色', '100000', null, null, null, null), ('1005', '玫瑰金', '100000', null, null, null, null), ('2000', '1G', '100001', null, null, null, null), ('2001', '2G', '100001', null, null, null, null), ('2002', '3G', '100001', null, null, null, null), ('2003', '4G', '100001', null, null, null, null), ('2004', '6G', '100001', null, null, null, null), ('2005', '8G', '100001', null, null, null, null), ('2006', '12G', '100001', null, null, null, null), ('3000', '128G', '100002', null, null, null, null), ('3001', '256G', '100002', null, null, null, null), ('3002', '512G', '100002', null, null, null, null), ('3003', '1T', '100002', null, null, null, null), ('3004', '16G', '100004', null, null, null, null), ('4003', '草莓味', '100005', null, null, null, null), ('4004', '榴莲味', '100005', null, null, null, null), ('6001', '1小时', '100006', null, null, null, null), ('6002', '2小时', '100006', null, null, null, null), ('6003', '3小时', '100006', null, null, null, null), ('6004', '4小时', '100006', null, null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `shop_brand`
-- ----------------------------
DROP TABLE IF EXISTS `shop_brand`;
CREATE TABLE `shop_brand` (
  `brandId` int(11) NOT NULL AUTO_INCREMENT,
  `cateId` int(11) NOT NULL,
  `name_cn` varchar(20) DEFAULT NULL,
  `name_en` varchar(20) DEFAULT NULL,
  `braDesc` text,
  `logo` varchar(50) DEFAULT NULL,
  `braState` varchar(10) DEFAULT NULL,
  `addr` varchar(255) DEFAULT NULL,
  `story` text,
  `creatTime` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`brandId`),
  KEY `cateId` (`cateId`)
) ENGINE=InnoDB AUTO_INCREMENT=100008 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `shop_brand`
-- ----------------------------
BEGIN;
INSERT INTO `shop_brand` VALUES ('100000', '101010', '联想牌', 'Lenovo', '', null, null, null, null, null), ('100002', '1501', '益达牌', 'YIDA', null, null, null, null, null, null), ('100003', '101010', '苹果', 'Apple', null, null, null, null, null, null), ('100004', '101010', '联想', 'YIDA', '联想集团是1984年中科院计算所投资20万元人民币，由11名科技人员创办，是中国的一家在信息产业内多元化发展的大型企业集团，和富有创新性的国际化的科技公司。', 'ffgrggs', '达到阿达阿文发啊', '5dawad', '大发阿迪王 分啊我方式额啊微软阿荣旗确认请提前去确认穷光蛋是沙发上', '2017-02-24 04:42:59'), ('100005', '1611', '拳头', 'FFFFFer', '拳头是一家美国网游开发商,成立于2006年,代表作品《英雄联盟》。拳头是一家为专业玩家提供高品质、高竞争力的网络游戏公司,力争成为全球领先的网游开发商和发行商。', null, null, null, null, null), ('100006', '1611', '腾讯', 'ASFDERD', '深圳市腾讯计算机系统有限公司成立于1998年11月[1]  ，由马化腾、张志东、许晨晔、陈一丹、曾李青五位创始人共同创立。[1]  是中国最大的互联网综合服务提供商之一，也是中国服务用户最多的互联网企业之一', null, null, null, null, null), ('100007', '1611', '任天堂', 'RTT', '任天堂（英语Nintendo）是日本一家全球知名的娱乐厂商，电子游戏业三巨头之一，现代电子游戏产业的开创者。任天堂始建于1889年9月23日，[1]  创始人山内房治郎。[1]  主营业务为家用游戏机和掌上游戏机的软硬件开发与发行。', null, null, null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `shop_category`
-- ----------------------------
DROP TABLE IF EXISTS `shop_category`;
CREATE TABLE `shop_category` (
  `cateId` int(11) NOT NULL,
  `cateName` varchar(20) DEFAULT NULL,
  `superId` int(11) DEFAULT NULL,
  `isSuper` int(11) DEFAULT NULL,
  `sortId` int(30) DEFAULT NULL,
  PRIMARY KEY (`cateId`),
  KEY `superId` (`superId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `shop_category`
-- ----------------------------
BEGIN;
INSERT INTO `shop_category` VALUES ('10', '电脑办公', null, '1', null), ('11', '手机数码', null, '1', null), ('12', '运动户外', null, '1', null), ('13', '家用电器', null, '1', null), ('14', '玩具乐器', null, '1', null), ('15', '食品零食', null, '1', null), ('16', '游戏', null, '1', null), ('1010', '电脑整机', '10', '0', null), ('1011', '电脑配件', '10', '0', null), ('1012', '外设', '10', '0', null), ('1501', '零食', '15', '0', null), ('1610', '手游', '16', '0', null), ('1611', '端游', '16', '0', null), ('101010', '笔记本', '1010', '0', null), ('101011', '台式机', '1010', '0', null), ('101012', '平板电脑', '1010', '0', null), ('101013', '一体机', '1010', '0', null), ('101110', '显示器', '1011', '0', null), ('101111', '硬盘', '1011', '0', null), ('101112', '内存', '1011', '0', null), ('101113', '主板', '1011', '0', null), ('101114', '电源', '1011', '0', null), ('101210', '键盘', '1012', '0', null), ('101211', '鼠标', '1012', '0', null), ('101212', '耳机', '1012', '0', null), ('101213', '摄像头', '1012', '0', null), ('161010', '休闲', '1610', '0', null);
COMMIT;

-- ----------------------------
--  Table structure for `shop_product`
-- ----------------------------
DROP TABLE IF EXISTS `shop_product`;
CREATE TABLE `shop_product` (
  `productId` int(20) NOT NULL,
  `proName` varchar(20) DEFAULT NULL,
  `brandId` int(11) DEFAULT NULL,
  `price` float(30,0) DEFAULT NULL,
  `creatTime` datetime DEFAULT NULL,
  PRIMARY KEY (`productId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `shop_product`
-- ----------------------------
BEGIN;
INSERT INTO `shop_product` VALUES ('100002', '益达口香糖', '100002', '5', null), ('100003', '苹果6s', '100003', '6999', null), ('100004', 'H1Z1', '100005', '76', null), ('100005', 'CS.GO', '100005', '120', null), ('100006', '王者荣耀', '100006', '89', null), ('100007', '超级玛丽', '100007', '25', null), ('100008', '饥荒', '100007', '25', null), ('100009', '火影忍者', '100006', '0', null);
COMMIT;

-- ----------------------------
--  Table structure for `shop_product_pic`
-- ----------------------------
DROP TABLE IF EXISTS `shop_product_pic`;
CREATE TABLE `shop_product_pic` (
  `picId` int(11) NOT NULL AUTO_INCREMENT,
  `url` varchar(50) DEFAULT NULL,
  `productId` int(11) DEFAULT NULL,
  `path` varchar(50) DEFAULT NULL,
  `isMain` int(11) DEFAULT NULL,
  `createTime` datetime DEFAULT NULL,
  PRIMARY KEY (`picId`),
  KEY `productId` (`productId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `shop_product_sku`
-- ----------------------------
DROP TABLE IF EXISTS `shop_product_sku`;
CREATE TABLE `shop_product_sku` (
  `skuId` int(11) NOT NULL COMMENT '单品编码',
  `amount` int(11) DEFAULT NULL,
  `price` float DEFAULT NULL,
  `outcode` float DEFAULT NULL,
  `state` int(11) DEFAULT NULL,
  `sku_name` varchar(10) DEFAULT NULL,
  `propertyStr` varchar(20) DEFAULT NULL,
  `barCode` int(11) DEFAULT NULL,
  `productCode` varchar(20) DEFAULT NULL,
  `creatTime` datetime DEFAULT NULL,
  PRIMARY KEY (`skuId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `shop_product_sku`
-- ----------------------------
BEGIN;
INSERT INTO `shop_product_sku` VALUES ('100', '4', '74', null, null, null, null, null, null, null), ('1000', '129', '10.2', null, null, null, null, null, null, null), ('8093', '100', '6999', null, null, null, null, null, null, null), ('57489', null, null, null, null, null, null, null, null, null), ('574829', '100', '1', null, null, null, null, null, null, null), ('574830', '100', '2', null, null, null, null, null, null, null), ('574831', '100', '3', null, null, null, null, null, null, null), ('574832', '100', '4', null, null, null, null, null, null, null), ('574833', '100', '5', null, null, null, null, null, null, null);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
